#!/bin/sh

. /etc/rc.d/functions

case $1 in
   start)
      log_info_msg "Starting CUPS Printserver..."
      start_daemon /usr/bin/cupsd
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping CUPS Printserver..."
      killproc /usr/bin/cupsd
      evaluate_retval
      ;;

   reload)
      log_info_msg "Reloading CUPS Printserver..."
      killproc /usr/bin/cupsd -HUP
      evaluate_retval
      ;;

   restart)
      $0 stop
      sleep 1
      $0 start
      ;;

   status)
      statusproc /usr/bin/cupsd
      ;;

   *)
      echo "Usage: $0 {start|stop|reload|restart|status}"
      exit 1
      ;;
esac

# End /etc/init.d/cups
